package cn.com.jslh.boarpro.main.model.breeditems;

/**
 * 作者：周洲 on 2017/7/27 08:46
 * <p>
 * 邮箱：double0zhou@126.com
 */

public class BreedItemFactory {
    public static int TextBreedItem = 0;
    public static int ChoseBreedItem = 1;
    public static int EditTextBreedItem = 2;
    public static int DateBreedItem = 3;

    public static BreedItem createBreedItem(BreedItem.DataTemplates dataTemplates) {
        switch (dataTemplates.type) {
            case 0:
                return new TextBreedItem(dataTemplates);
            case 1:
                return new ChoseBreedItem(dataTemplates);
            case 2:
                return new EditTextBreedItem(dataTemplates);
            case 3:
                return new DateBreedItem(dataTemplates);
            default:
                return  null;
        }
    }
}
